<?php
include ("fonction.php");
print '<?xml version="1.0" encoding= "ISO-8859-1"?>';
$def_array	= $def_film;
$sql_query=mysql_query("SELECT ".DATABASE_TABLE_FILE.".name, ".DATABASE_TABLE_FILE.".taille, ".DATABASE_TABLE_FILE.".date, ".DATABASE_TABLE_FILE.".server 
			FROM ".DATABASE_TABLE_FILE." WHERE (".array_in_where_clause(DATABASE_TABLE_FILE.".name",$def_array).")  ORDER BY date DESC LIMIT 30") or die(mysql_error());
			
?>

<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Search</title>
		<link><?php print SERVER_ADDRESS_HTTP; ?></link>
		<description>The last films of search</description>
		<language>fr</language> 
		<?php
		while ($query = mysql_fetch_array($sql_query) ){
		?>
		
		<item>
		      <title><?php print rm_ext($query['name']); ?></title>
		      <link><?php print SERVER_ADDRESS_HTTP."/index.php?file=".urlencode($query['name'])."&amp;page=search&amp;server=".$query['server']; ?></link>
		      <description>Serveur : <?php print $query['server']; ?> (<?php print date("d M y",$query['date']);?>)</description>
		      <pubDate><?php print date("d M y",$query['date']);?></pubDate>
		</item>
		<?php
		 }
		 ?>
		 
	</channel>
</rss> 